64323db0c0aa1b1bf026dda39c403e903cb42e9b,xwiki-platform-core/xwiki-platform-mail/xwiki-platform-mail-send/xwiki-platform-mail-send-storage/src/main/java/org/xwiki/mail/internal/DatabaseMailStatusResult.java,DatabaseMailStatusResult,getByState,#MailState#,100

Before Change



        try {
            return this.mailStatusStore.load(
                Collections.<String, Object>singletonMap("state", state.toString())).iterator();
        } catch (MailStoreException e) {
            LOGGER.error("Failed to get results by state. Returning an empty result.", e);
            return Collections.emptyIterator();

After Change


        }

        try {
            Map<String, Object> filterMap = new HashMap<>();
            filterMap.put(BATCHID_KEY, this.batchId);
            filterMap.put("state", state.toString());
            return this.mailStatusStore.load(filterMap).iterator();
        } catch (MailStoreException e) {
            LOGGER.error("Failed to get results by state. Returning an empty result.", e);